<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>

<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<%@taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@taglib prefix="form" uri="http://www.springframework.org/tags/form"%>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">

<script type="text/javascript">
	$(function() {
		$('#dob').datepicker({
			dateFormat : 'yy-mm-dd',
			changeYear : true,
			yearRange : 'c-100:c'
		});
	});
</script>

</head>
<body>
	<h3>New Patient Registration Form</h3>
	<form:form action="register" method="POST" modelAttribute="p">

		<table border="0">
			<tr>
				<th><label for="firstName">Patient name:</label></th>
				<td><table>
						<tr>
							<td><form:input path="firstName" id="firstName" maxlength="100"/></td>
							<td><form:input path="middleName" maxlength="100"/></td>
							<td><form:input path="lastName" maxlength="100"/></td>
						</tr>
					</table>
				</td>
				<td><form:errors path="firstName" cssClass="error" /></td>
			</tr>
			<tr>
				<th><label for="gender">Gender:</label></th>
				<td><form:radiobutton path="gender" value="M" />Male <form:radiobutton
						path="gender" value="F" />Female</td>
				<td><form:errors path="gender" cssClass="error" /></td>
			</tr>
			<tr>
				<th><label for="dob">Date of Birth:</label></th>
				<td><form:input path="dob" id="dob" /></td>
				<td><form:errors path="dob" cssClass="error" /></td>
			</tr>
			<tr>
				<th><label>Address:</label></th>
				<td><table>
						<tr>
							<th><label for="building">Building:</label></th>
							<td><form:input path="building" id="building" /></td>
							<td></td>
						</tr>
						<tr>
							<th><label for="street">Street:</label></th>
							<td><form:input path="street" id="street" /></td>
							<td></td>
						</tr>
						<tr>
							<th><label for="city">City:</label></th>
							<td><form:input path="city" id="city" /></td>
							<td></td>
						</tr>
						<tr>
							<th><label for="state">State:</label></th>
							<td><form:input path="state" id="state" /></td>
							<td></td>
						</tr>
						<tr>
							<th><label for="country">Country:</label></th>
							<td><form:input path="country" id="country" /></td>
							<td></td>
						</tr>
						<tr>
							<th><label for="pincode">Pincode:</label></th>
							<td><form:input path="pincode" id="pincode"  maxlength="6"/></td>
							<td><form:errors path="pincode" cssClass="error" /></td>
						</tr>
						<tr>
							<th><label for="email">Email:</label></th>
							<td><form:input path="email" id="email" maxlength="200"/></td>
							<td><form:errors path="email" cssClass="error" /></td>
						</tr>
						<tr>
							<th><label for="mobileNumber">Mobile Number:</label></th>
							<td><form:input path="mobileNumber" id="mobileNumber" maxlength="10"/></td>
							<td><form:errors path="mobileNumber" cssClass="error" /></td>
						</tr>
					</table></td>
				<td>&nbsp;</td>
			</tr>
			<tr>
				<td></td>
				<td></td>
				<td></td>
			</tr>

		</table>


		<form:button
			class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only">
			<span class="ui-button-text">Save</span>
		</form:button>

	</form:form>
</body>
</html>